//
//  FMAudioRecord.h
//  TestDemo
//
//  Created by fengxijun on 4/19/16.
//  Copyright © 2016 goappbox. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger,FMAudioRecordStatus) {
    FMAudioRecordNotAllowed = 1,
    FMAudioRecordBegin = 2,
};

@interface FMAudioRecord : NSObject

@property (nonatomic, strong, readonly) NSURL *url;

- (instancetype)initWithFile:(NSString *)filepath;

- (instancetype) initWithUrl:(NSURL *)url;

@property (nonatomic, assign) NSTimeInterval duration;

@property (nonatomic, copy) void(^audioRecordStatus)(NSInteger status);

@property (nonatomic, copy) void(^audioRecordProgress)(NSTimeInterval duration);

- (void)record;

- (void)stop;

- (void)pause;

- (void)resume;

@end
